home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(status == "alive")
- {
- if(0 >= health)
- {
- this.gotoAndPlay(_parent.num_levels + 1);
- status = "dead";
- }
- num_frames_shoot = Math.floor(health / 3.5) + 10;
- if(frame % num_frames_shoot == 0)
- {
- _parent.enemy_bullet.duplicateMovieClip("enemy_bullet" + depth,depth);
- _parent["enemy_bullet" + depth].x = this._x;
- _parent["enemy_bullet" + depth].y = this._y;
- depth++;
- }
- frame++;
- if(frame % num_frames_x == 0)
- {
- x += velx;
- }
- if(right < x)
- {
- x = right;
- velx *= -1;
- y += vely;
- }
- else if(x < left)
- {
- x = left;
- velx *= -1;
- y += vely;
- }
- if(bottom < y)
- {
- y = start_y;
- }
- this._x = x;
- this._y = y;
- }
- }
-